package com.boomsecret.pattern.factory.abstractFactory;

import com.boomsecret.pattern.factory.Dough;

/**
 * Created by wangjinliang on 2018/1/31.
 */
public class AbstractFactoryDemo {
    public static void main(String[] args) {
        PizzaIngredientFactory nyFactory = new NYPizzaIngredientFactory();
        Dough nyDough = nyFactory.createDough();
        System.out.println(nyDough.getName());

        PizzaIngredientFactory seattleFactory = new SeattlePizzaIngredientFactory();
        Dough seattleDough = seattleFactory.createDough();
        System.out.println(seattleDough.getName());
    }
}
